package chapter_eleven.p152;

/**
 * Data time:2021/10/18 15:19
 * StudentID:2019112118
 * Author:hgw
 * Description:
 */
public class Client {
    public static void main(String[] args) {
        //针对抽象构建编程
        AbstractFile file1,file2,file3,file4,file5,folder1,folder2,folder3,folder4,folder5;

        folder1 = new Folder("Hgw的资料");
        folder2 = new Folder("图像文件");
        folder3 = new Folder("文件文件");
        folder4 = new Folder("视频文件");

        file1 = new ImageFile("王源鹏裸照.jpg");
        file2 = new ImageFile("苍老师.gif");
        file3 = new ImageFile("九阴真经.txt");
        file4 = new ImageFile("金瓶梅.doc");
        file5 = new ImageFile("笑傲江湖.rmvb");

        folder2.add(file1);
        folder2.add(file2);
        folder3.add(file3);
        folder3.add(file4);
        folder4.add(file5);
        folder1.add(folder2);
        folder1.add(folder3);
        folder1.add(folder4);

        //从"hgw"的资料结点开始进行杀毒操作
        folder1.killVirus();

    }
}
